#include <stdio.h>
#include <string.h>

// #define DEBUG
char choice(int power, int max_power) {
  int i = 1;
  int mask = 1 << power;
#ifdef DEBUG
  printf("mask:%d\n", mask);
#endif
  char buf[0x100];
  for (; i < (1 << max_power); i++) {
    if (i & mask)
      printf("%d ", i);
  }
  for (;;) {
    printf("\n包不包含？(1/0)");
    scanf("%s", buf);
    if (strcmp(buf, "1") == 0)
      return 1;
    else if (strcmp(buf, "0") == 0)
      return 0;
    else
      printf("输入错误！请重新输入！\n");
  }
}
int main() {
  int power = 0;
  int val = 0;
  int max_power = 4;
  for (; power < max_power; power++) {
    val = val | (choice(power, max_power) << power);
#ifdef DEBUG
    printf("val:\t%d\n", val);
#endif
  }
  printf("你准备的数是%d\n", val);
}